/**
*      author: Y_Yao
*      created: 2025-03-21 22:32:06
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
int n;

int count(int a,int b,int c)
{
    int l = 0,r = 1e9;
    while(l < r)
    {
        int mid = (l + r + 1) >> 1;
        if(a * mid * mid + b * mid + c <= 0)l = mid;
        else r = mid - 1;    
    }

    if(a * l * l + b * l + c == 0)
    {
        return l;
    }
    return -1;
}

void solve()
{
    cin >> n;
    for(int d = 1;d * d * d <= n;d++)
    {
        if(n % d != 0) continue;
        int a = 3;
        int b = 3 * d;
        int c = d * d - n / d;
        int y = count(a,b,c);
        if(y > 0)
        {
            cout << y + d << " " << y << endl;
            return;
        }
    }
    cout << -1 << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}